<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
  <title>镜灵-前端导航</title>
  <style type="text/css">
    .icon {
       width: 1em; height: 1em;
       vertical-align: -0.15em;
       fill: currentColor;
       overflow: hidden;
    }
  </style>
  <link rel="stylesheet" href="./style.css">
</head>
<body>
  
  <canvas id='myCanvas' width="400" height="120" >
  </canvas>
  <header class="globalHeader">
    <form class="searchForm" method="get" action="https://www.baidu.com/s">
      <input name="wd" type="text">
      <button type="submit">搜索</button>      
    </form>
  </header>
  <main class="globalMain">
    <ul class="siteList">
      <li class="last">
        <div class="addButton">
          <div class="iconWrapper">
            <svg class="icon">
              <use xlink:href="#icon-add"></use>
            </svg>
          </div>
          <div class="text">新增网站</div>
        </div>
      </li>
    </ul>
  </main>
  <script src="//at.alicdn.com/t/font_2289051_1j8fbsjbm3h.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="./main.js"></script>
  <script type="text/javascript">
    $(function() {
      //添加窗口尺寸改变响应监听
      $(window).resize(resizeCanvas);
      //页面加载后先设置一下canvas大小
      resizeCanvas();
    });

    //窗口尺寸改变响应（修改canvas大小）
    function resizeCanvas() {
      $("#myCanvas").attr("width", $(window).get(0).innerWidth);
      $("#myCanvas").attr("height", $(window).get(0).innerHeight);
    };
  </script>
</body>
</html>